# Maintainer: Alexey Pavlov <alexpux@gmail.com>

_realname=WWW-RobotRules
pkgname=perl-${_realname}
pkgver=6.02
pkgrel=2
pkgdesc="Database of robots.txt-derived permissions"
arch=('any')
url="https://metacpan.org/release/WWW-RobotRules"
groups=('perl-modules')
license=('PerlArtistic' 'GPL')
depends=('perl' 'perl-URI')
options=('!emptydirs')
source=(https://www.cpan.org/authors/id/G/GA/GAAS/${_realname}-${pkgver}.tar.gz)
sha256sums=('46b502e7a288d559429891eeb5d979461dd3ecc6a5c491ead85d165b6e03a51e')

build() {
  cd "${srcdir}/${_realname}-${pkgver}"
  perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
  cd "${srcdir}/${_realname}-${pkgver}"
  make test
}

package() {
  cd "${srcdir}/${_realname}-${pkgver}"
  make DESTDIR="${pkgdir}" install
}
